home *** CD-ROM | disk | FTP | other *** search
- Path: news.production.compuserve.com!news
- From: Alan Huff <74312.2300@CompuServe.COM>
- Newsgroups: comp.lang.c++
- Subject: Constructor member initializer list
- Date: 3 Apr 1996 16:50:28 GMT
- Organization: Motorola Lexicus
- Message-ID: <4jua8k$fa1$2@mhadg.production.compuserve.com>
-
- How do you initialize class members in the initializer list if the
- member is a structure?
-
- Consider the following code fragment.
-
- typedef struct _tagRect {
- int x;
- int y;
- int w;
- int h;
- } RECTANGLE;
-
- class Foo {
- Foo() : <how do I initialize fooRect and it's members> {};
- RECTANGLE fooRect;
- };
-
- Any suggestions would be greatly appreciated.
-